package com.gxgeek.javabasic.web.contrller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by GX on 2017/8/22.
 */
@RestController
@Slf4j
public class RouteController {
    public static int count=0;

    @RequestMapping("/hello")
    public String hello(@RequestParam("name")String name){
        synchronized (name){
            count++;
            log.info(String.valueOf(count));
        }
        return "success";
    }

}
